package com.free.solon.service.impl;

import com.free.solon.common.model.PageResult;
import com.free.solon.mapper.CropCategoryMapper;
import com.free.solon.model.CropCategory;
import com.free.solon.service.CropCategoryService;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.solon.service.impl.ServiceImpl;
import org.noear.solon.annotation.Component;

import java.util.List;

/**
 * @Author: hao.ding@insentek.com
 * @Date: 2024/5/21 11:34
 */
@Component
public class CropCategoryServiceImpl extends ServiceImpl<CropCategoryMapper, CropCategory> implements CropCategoryService {

    @Override
    public PageResult<CropCategory> getPages(Integer page, Integer limit) {
        Page<CropCategory> pageResult = this.page(new Page<>(page, limit));
        return PageResult.build(pageResult);
    }
}
